package vsy.buzzwordbingo.sort;



import vsy.buzzwordbingo.model.Game;

public class GameCreationTimeComparator extends OrderedComparator<Game> {
	public GameCreationTimeComparator(Order order) {
		super(order);
	}

	@Override
	public int orderedCompare(Game g1, Game g2) {
		return (g1.getCreationTime() < g2.getCreationTime()) ? -1 :
			   (g1.getCreationTime() > g2.getCreationTime()) ? 1 : 0; 
	}
}
